package com.vdongchina.miniapp.http.dto;

import com.fasterxml.jackson.annotation.JsonAlias;
import lombok.Data;

import java.io.Serializable;

/**
 * Copyright (C)
 * FileName: QueryRefundRequest
 * Author:   maokai
 * Date:     2021/8/12 16:27
 * Description:
 */
@Data
public class QueryRefundResp extends ServiceResp {
    private RefundInfo refundInfo;

    @Data
    public static class RefundInfo implements Serializable {
        @JsonAlias(value = "refund_no")
        private String refundNo;

        @JsonAlias(value = "refund_amount")
        private int refundAmount;
        @JsonAlias(value = "refund_status")
        private String refundStatus;

        public boolean success() {
            return "SUCCESS".equals(refundStatus);
        }
    }
}
